// 先从PC端模板开始弄把 , 移动端的模板先搁置一下。
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource';

// import
import {i18n, loadLanguageAsync, initI18n} from '@/setup/i18n-setup.js'
import '@/css/reset.css'
import 'mint-ui/lib/style.css'
import './components/lib/projectConfig'
import store from './vuex/store'
// Vue.config.productionTip = false
//init adaptation setting
import '@/setup/rem'


Vue.use(VueResource);
// Vue.use(VueI18n);
// Vue.use(Vuex);

//Vue auth setting
try {//but my be have not setuserinfo
  /*let userinfo = getUserInfo();
  if(userinfo) {
    let u = JSON.parse(userinfo);
    Vue.http.headers.common['Authorization'] = 'Bearer '+u.auth;
  }*/
} catch (e) {
  console.warn('载入用户信息时候发生问题，无法创建授权连接')
  console.warn(e);
}

initI18n();

new Vue({
  el: '#app',
  store,
  router,
  components: {App},
  template: '<App/>',
  i18n
});
